/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package simplemetrosystem.view.menu;

import javax.swing.JMenu;
import simplemetrosystem.model.charlanguage.NameMap;
import simplemetrosystem.view.MetroFrame;

/**
 *
 * @author Eric Qian
 */
public class HelpMenu extends JMenu {

    public HelpMenu(MetroFrame frame) {
        super();
        name = NameMap.getInstance().getName("Help");
        this.setText(name);
        this.frame = frame;

        addItem();
    }

    private void addItem() {
        this.add(getHelpHelpItem());
        this.add(getHelpAboutItem());
    }
    
    public HelpHelpItem getHelpHelpItem(){
        if(hhItem == null){
            hhItem = new HelpHelpItem(frame);
        }
        return hhItem;
    }
    
    public HelpAboutItem getHelpAboutItem(){
        if(haItem == null){
            haItem = new HelpAboutItem(frame);
        }
        return haItem;
    }
    
    private MetroFrame frame;
    private String name;
    private HelpHelpItem hhItem;
    private HelpAboutItem haItem;
}